<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
        	<div class="ct_detail_pd">
            	<div class="ct_detail_pic">
                    <a href="javascript:window.open('${ctx}/front!toLink.action?id=${data.goodsId}');">
                        <img src="${data.goodsPic}" alt="${data.goodsName}" width="450" height="450" />
                    </a>
            	</div>
                <div class="ct_detail_desc">
                    <h1 class="ct_detail_tt">
                        <a href="javascript:window.open('${ctx}/front!toLink.action?id=${data.goodsId}');" title="${data.goodsName}">${data.goodsName}</a>
                    </h1>
                    <h1 class="ct_detail_rm">推荐理由</h1>
                    <div class="ct_detail_explain">
                        <p class="ct_detail_contenxt" id="detailContext" key="close">${data.recommend}</p>
                        <p><a href="javascript:;" class="ct_detail_more" id="detailMore">展开<b ></b></a></p>
                    </div>
                    <div class="ct_detail_go">
                        <a href="javascript:window.open('${ctx}/front!toLink.action?id=${data.goodsId}');" title="去看一下" >去看一下</a>
                    </div>
                    
                    <div class="ct_detail_opt">
                        <ul  class="ct_detail_links">
                            <li>
                                <a href="javascript:addLike('${data.goodsId}');" title="喜欢" class="ct_detail_like">喜欢 <span id='likeNum'>${data.countLike}</span></a>
                            </li>
                            <li>
                                <a href="javascript:addFavorite('${data.goodsId}');" title="收藏" class="ct_detail_col">收藏 <span id='favoriteNum'>${data.countFavorite}</span></a>
                            </li>
                            <li>
                                <a title="年龄" class="ct_detail_age">年龄 ${data.ageArea}</a>
                            </li>
                            <li>
                                <a href="javascript:;" title="在线客服" class="ct_detail_ser">在线客服</a>
                            </li>
                        </ul>
	                    <div>
							<span class="float_lf">分享到：</span>
							<div class="jiathis_style_24x24">
								<a class="jiathis_button_qzone"></a>
								<a class="jiathis_button_tsina"></a>
								<a class="jiathis_button_tqq"></a>
								<a class="jiathis_button_renren"></a>
								<a class="jiathis_button_kaixin001"></a>
								<a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
							</div>
							<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js?uid=1350895199037564" charset="utf-8"></script>
						</div>
                        
                    </div>
                </div>
            </div>
<script type="text/javascript">
<!--
//添加收藏
function addFavorite(goodsId){	
	$.post("${ctx}/favorite!add.action", "goodsId="+goodsId ,function callback(txt){   
			var json = $.parseJSON(txt);
			if (json.code==0) {	
				$('#favoriteNum').html(parseInt($('#favoriteNum').html())+1);
				doQueryFavorite();
			}else if (json.code==2) {	
				alert('已在收藏列表中！');
			}else if (json.code==3) {	
				alert('请先登录！');
			}else{
				alert('添加收藏失败！');
			}
		}	
	);
}
//添加喜欢
function addLike(goodsId){	
	$.post("${ctx}/favorite!addLike.action", "goodsId="+goodsId ,function callback(txt){   
			var json = $.parseJSON(txt);
			if (json.code==0) {	
				$('#likeNum').html(parseInt($('#likeNum').html())+1);
			}else if (json.code==2) {	
				alert('已在喜欢列表中！');
			}else if (json.code==3) {	
				alert('请先登录！');
			}else{
				alert('添加喜欢失败！');
			}
		}	
	);
}
//-->
</script>